package com.csproj.system.service.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the Dictionary entity.
 */
public class DictionaryDTO implements Serializable {

    private String id;

    private String dictionaryType;

    private String dictionaryName;

    private String itemKey;

    private String itemValue;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDictionaryType() {
        return dictionaryType;
    }

    public void setDictionaryType(String dictionaryType) {
        this.dictionaryType = dictionaryType;
    }

    public String getDictionaryName() {
        return dictionaryName;
    }

    public void setDictionaryName(String dictionaryName) {
        this.dictionaryName = dictionaryName;
    }

    public String getItemKey() {
        return itemKey;
    }

    public void setItemKey(String itemKey) {
        this.itemKey = itemKey;
    }

    public String getItemValue() {
        return itemValue;
    }

    public void setItemValue(String itemValue) {
        this.itemValue = itemValue;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        DictionaryDTO dictionaryDTO = (DictionaryDTO) o;
        if(dictionaryDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), dictionaryDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "DictionaryDTO{" +
            "id=" + getId() +
            ", dictionaryType='" + getDictionaryType() + "'" +
            ", dictionaryName='" + getDictionaryName() + "'" +
            ", itemKey='" + getItemKey() + "'" +
            ", itemValue='" + getItemValue() + "'" +
            "}";
    }
}
